import React, {Component} from 'react';
class TextareaComponent extends Component {
  //props
  constructor(props) {
    super(props)
    this.state = {
      value: '这是文本框'
    };
    this.handleChange = this
      .handleChange
      .bind(this);
  };

  handleChange(event) {
    this.setState({value: event.target.value})
  };

  render() {
    return (
      <div>
        <textarea
          name=""
          id=""
          cols="30"
          rows="10"
          value={this.state.value}
          onChange={this.handleChange}></textarea>
        <span>{this.state.value}</span>
      </div>
    )
  }
}

export default TextareaComponent